﻿@model BanDTBLL.tintuc

@{
    ViewBag.Title = "Chỉnh sửa bài viết";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Edit","TinTuc",FormMethod.Post, new { enctype = "multipart/form-data" })) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Chỉnh sửa tin tức</legend>

        <div class="editor-field" style=" visibility:hidden">
            @Html.EditorFor(model => model.ma)
            @Html.ValidationMessageFor(model => model.ma)
        </div>

        <div class="editor-label">
            Tiêu đề
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.tieude)
            @Html.ValidationMessageFor(model => model.tieude)
        </div>

        <div class="editor-label">
            Nội dung
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.noidung)
            @Html.ValidationMessageFor(model => model.noidung)
        </div>

        <div class="editor-label">
           Hình ảnh
        </div>
        <div><input type="file" name="file" /></div>
        <input type="submit" value="Lưu" />
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
